<ui:composition template="/WEB-INF/templates/defaultLayout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:define name="title">
		#{lang.getTrans("ui.mobile.user.title")}
	</ui:define>
	<ui:define name="layoutCenter">
		<h:form>
			<p:growl id="growl"/>
			<p:breadCrumb>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.home')}" url="/home.xhtml"/>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.user.group')}" url="/crud/userGroup/userGroupList.xhtml"/>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.editar')}" url="/crud/userGroup/userGroupForm.xhtml"/>
			</p:breadCrumb>
			<p:panel id="panel" header="Cadastro de Grupos de Usuarios">
				<h:panelGrid columns="2">
					<h:outputLabel for="cdUserGroup" value="#{lang.getTrans('ui.mobile.user.group.name')}"/>
					<p:inputText id="cdUserGroup" value="#{userGroupBean.userGroup.cdUserGroup}" 
						required="true" size="50" maxlength="80"
						requiredMessage="#{lang.getTrans('ui.mobile.user.group.name.obrigatorio')}">
					</p:inputText>

					<h:outputLabel value="#{lang.getTrans('ui.mobile.user.group.description')}" />
					<p:inputTextarea id="dsUserGroup" cols="50" rows="10" 
						value="#{userGroupBean.userGroup.dsUserGroup}" required="true"
						requiredMessage="#{lang.getTrans('ui.mobile.user.group.description.obrigatorio')}"/>
					
					<!-- 	
					<h:outputLabel value="#{lang.getTrans('ui.mobile.user.group.pages')}" />
				    <p:pickList id="pages" value="#{userGroupBean.listPages}" var="page" itemLabel="#{page}" 
				    	itemValue="#{page}" converter="pages" >
             		    <f:facet name="sourceCaption">Paginas</f:facet>  
        				<f:facet name="targetCaption">Paginas do Grupo</f:facet> 
                	</p:pickList>
                	 -->  	

				</h:panelGrid>
			</p:panel>
			<p:blockUI block="panel" trigger="btSub"/>
			<p:panel style="text-align:center">
				<h:inputHidden id="idUserGroup" value="#{userGroupBean.userGroup.idUserGroup}" />
				<h:inputHidden id="nrVersion" value="#{userGroupBean.userGroup.nrVersion}" />
				<p:commandButton id="btSub" value="#{lang.getTrans('ui.mobile.common.save')}"
					type="submit" action="#{userGroupBean.adicionar}" update="growl"/>
				<p:button value="#{lang.getTrans('ui.mobile.common.cancel')}" outcome="userGroupList" />
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
